package com.ocom.emqx.client;

import com.ocom.common.constant.PayHandleUrl;
import com.ocom.common.entity.card.EntityXfRecord;
import com.ocom.common.request.payhandle.*;
import com.ocom.common.resp.RespMachMessage;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.pay.FaceErrVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.Map;

@FeignClient(value = "payhandle")
public interface PayoperFeignService {

    @GetMapping(PayHandleUrl.URL_PayHandle_GetDeviceFlag)
    public RespMachMessage getDeviceFlag(@RequestParam("companyId")Long companyId, @RequestParam("machNo") String machNo, @RequestParam("versionCode") String versionCode);

    /**
     * 2.8.1 付款码支付请求（qrCodePay）
     */
    @PostMapping(PayHandleUrl.URL_PayHandle_qrCodePay)
    public Result qrCodePay(@RequestBody QrCodePayRequest request);

    /**
     * 付款码订单查询（qrCodeQuery）
     */
    @PostMapping(PayHandleUrl.URL_PayHandle_qrCodeQuery)
    public Result qrCodeQuery(@RequestBody QrCodeQueryRequest request);

    @PostMapping(PayHandleUrl.URLP_PayConfig_GetMerchInfoByMachNo)
    public Result GetMerchInfoByMachNo(@RequestParam("comId") Long comId,@RequestParam("machNo") String machNo);

    @PostMapping(PayHandleUrl.getPayCard)
    public Result getPayCard(@RequestBody  QrCardPayRequest request);
}

